package com.qf.fmall2202.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: 可乐
 * @Description:
 * @CreateTime: 2022-11-03  14:11
 */
@Configuration
public class MyBatisPlusConfig {
	@Bean
	public MybatisPlusInterceptor mybatisPlusInterceptor() {
		MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
		// 开启mp 的分页功能
		interceptor.addInnerInterceptor(new PaginationInnerInterceptor( DbType.MYSQL));
		return interceptor;
	}

}
